<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Vue 测试实例 - 菜鸟教程(runoob.com)</title>
<script src="https://cdn.staticfile.org/vue/3.2.36/vue.global.min.js"></script>
</head>

<body>
<div id="hello-vue" class="demo">
  <university_info v-for="university in universities" :province="university.pro" :name="university.name"></university_info>
</div>

<script>
const Un = {
  data(){
    return {
      universities:[
        {pro:"Beijing",name:'tinghua'},
        {pro:"Shanghai",name:'fudan'},
        {pro:"Chengdu",name:'nsu'},
      ]
    }
  }
}

const app =  Vue.createApp(Un)

app.component('university_info',{
  props:['province','name'],
  template:'<h1>{{province}} - {{name}}</h1>'
})

app.mount('#hello-vue')

</script>
</body>
</html>
